8c39fdbeca91fbdf4f01b2a4775dcd3fbd26a409,app/src/main/java/com/lovejjfg/circle/widget/JumpBall.java,JumpBall,resetPoints,#,79

Before Change


        float m = mCircleRadius * CIRCLE_VALUE;

        p0.setPoint(mWidth / 2, Math.abs(mHeight / 2 - mCircleRadius));
        p1.setPoint(mWidth / 2 + m, Math.abs(mHeight / 2 - mCircleRadius));
        p2.setPoint(mWidth / 2 + mCircleRadius, Math.abs(mHeight / 2 - m));
        p3.setPoint(mWidth / 2 + mCircleRadius, mHeight / 2);

After Change


        float m = mCircleRadius * CIRCLE_VALUE;
        int centerY = (int) ((mHeight - dropHeight) / 2 + mCircleRadius);
        int topY = (mHeight - dropHeight) / 2;
        int BottomY = (int) ((mHeight - dropHeight) / 2 + 2 * mCircleRadius);

        p2.setPoint(mWidth / 2 + mCircleRadius, centerY + m);
        p3.setPoint(mWidth / 2 + mCircleRadius, centerY);
        p4.setPoint(mWidth / 2 + mCircleRadius, centerY - m);

        p5.setPoint(mWidth / 2 + m, topY);
        p6.setPoint(mWidth / 2, topY);
        p7.setPoint(mWidth / 2 - m, topY);

        p8.setPoint(mWidth / 2 - mCircleRadius, centerY - m);
        p9.setPoint(mWidth / 2 - mCircleRadius, centerY);
        p10.setPoint(mWidth / 2 - mCircleRadius, centerY + m);

        p11.setPoint(mWidth / 2 - m, BottomY);
        p0.setPoint(mWidth / 2, BottomY);
        p1.setPoint(mWidth / 2 + m, BottomY);
    }